home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / fffcntl.z / fffcntl
Encoding:
Text File  |  1998-10-30  |  23.2 KB  |  458 lines

  1. FFFCNTL(3C)                                           Last changed: 2-25-98
  2.  
  3.  
  4. NNAAMMEE
  5.      ffffffccnnttll - Performs functions on files opened using flexible file I/O
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<ffffiioo..hh>>
  9.  
  10.      UNICOS and UNICOS/mk systems:
  11.  
  12.         iinntt ffffffccnnttll ((iinntt _f_d,, iinntt _c_m_d,, [[,,lloonngg **_a_r_g,, ssttrruucctt ffffssww **_s_t_a_t]]));;
  13.  
  14.      IRIX systems:
  15.  
  16.         iinntt ffffffccnnttll ((iinntt _f_d,, iinntt _c_m_d,, vvooiidd **_a_r_g,, ssttrruucctt ffffssww **_s_t_a_t));;
  17.  
  18. IIMMPPLLEEMMEENNTTAATTIIOONN
  19.      UNICOS, UNICOS/mk, and IRIX systems
  20.  
  21. DDEESSCCRRIIPPTTIIOONN
  22.      The ffffffccnnttll function performs a variety of functions on files opened
  23.      by ffffooppeenn or ffffooppeennss, using flexible file I/O (FFIO).  Arguments are
  24.      as follows:
  25.  
  26.      _f_d     Number returned by function ffffooppeenn or ffffooppeennss.
  27.  
  28.      _c_m_d    Specifies values defined in header file ffffiioo..hh.  See under the
  29.             next heading, VALUES FOR _c_m_d ARGUMENT.
  30.  
  31.      _a_r_g    The type and value of _a_r_g is _c_m_d specific.  See preceding
  32.             descriptions.
  33.  
  34.      _s_t_a_t   Pointer to the status return structure.
  35.  
  36.    VVaalluueess ffoorr _c_m_d AArrgguummeenntt
  37.      The following values can be used for the _c_m_d argument introduced
  38.      above:
  39.  
  40.      FFCC__AACCPPTTBBAADD
  41.            Accepts bad data (valid only for online tape files on UNICOS and
  42.            UNICOS/mk systems and ER90 files on UNICOS systems.)  _a_r_g is a
  43.            pointer to structure ffffcc__bbaaddddaattaa__ss, defined in header file
  44.            ffffiioo..hh.  This _c_m_d is valid with the ttaappee FFIO layer.  The fields
  45.            of this structure have the following meaning:
  46.  
  47.            ffffcc__bbyytteess       Number of bytes of bad data transferred is
  48.                            returned in this field.
  49.  
  50.            ffffcc__mmaaxxffllaagg     Set this value to 1 if a maximum value is
  51.                            specified in field ffffcc__mmaaxxwwoorrddss.  Set this value
  52.                            to 0 if no maximum value is specified.
  53.  
  54.            ffffcc__mmaaxxwwoorrddss    Maximum number of words of bad data to transfer
  55.                            to user's data area.  If the number of words of
  56.                            bad data in the block exceed this value, the
  57.                            excess is discarded.
  58.  
  59.            ffffcc__tteerrmmccnndd     Position after accepting bad data is shown in
  60.                            this field, as follows:  0 indicates end of
  61.                            block; 1 indicates EEOOFF; 2 indicates EEOODD; and a
  62.                            value less than 0 indicates that an error
  63.                            occurred.  The absolute value is the error
  64.                            number.
  65.  
  66.            ffffcc__uuddaa         User data area to receive bad data.
  67.  
  68.      FFCC__AASSPPOOLLLL
  69.            Checks for completion of an asynchronous FFIO request.  Argument
  70.            _a_r_g is a pointer to a structure of type ssttrruucctt ffffssww, which had
  71.            previously been passed to an asynchronous FFIO request.  The
  72.            purpose of this call is to pass control to the underlying layers
  73.            to do intermediate processing or cleanup on the request.  If the
  74.            request is complete, fields in the status return structure are
  75.            set as described under function ffffrreeaaddaa(3C).
  76.  
  77.      FFCC__CCHHEECCKKTTPP
  78.            Checks tape position.  This value is valid only for online tape
  79.            files on UNICOS and UNICOS/mk systems and ER90 files on UNICOS
  80.            systems.  _a_r_g is a pointer to structure ffffcc__cchhkkttpp__ss, defined in
  81.            header file ffffiioo..hh.  This command is valid with the ttaappee FFIO
  82.            layer.  The fields of this structure have the following meaning:
  83.  
  84.            _s_t_a_t  The status of the tape, as follows:
  85.                  -1 = No status
  86.                   0 = At EOV
  87.                   1 = Tape off reel
  88.                   2 = Tape mark detected
  89.                   3 = Blank tape detected
  90.  
  91.                  The remaining fields are unused.
  92.  
  93.      FFCC__EENNDDSSPP
  94.            Ends special processing.  This value is valid only for online
  95.            tape files on UNICOS and UNICOS/mk systems and ER90 files on
  96.            UNICOS systems.  _a_r_g is unused.  This function removes the
  97.            alternate path to tape created by FFCC__SSTTAARRTTSSPP.  Tape blocks that
  98.            were held aside are written to tape.  This _c_m_d is valid with the
  99.            ttaappee FFIO layer.
  100.  
  101.      FFCC__CCLLOOSSEEVV
  102.            Closes volume and mounts next volume in the Volume Identifier
  103.            list.  _a_r_g is unused.  This value is valid only for online tape
  104.            files on UNICOS and UNICOS/mk systems and ER90 files on UNICOS
  105.            systems.  The eerr9900 layer is not supported on CRAY T3E systems.
  106.            This _c_m_d is valid with the following FFIO layers:  ttaappee, eerr9900,
  107.            bbuuffaa.
  108.  
  109.      FFCC__GGEETTTTPP
  110.            Retrieves information about an opened tape file (valid only for
  111.            online tape files on UNICOS and UNICOS/mk systems and ER90 files
  112.            on UNICOS systems.  _a_r_g is a pointer to structure ffffcc__ggeettttpp__ss,
  113.            defined in header file ffffiioo..hh.
  114.  
  115.            The eerr9900 layer does not guarantee that records correspond to
  116.            physical tape blocks.  See the aassssiiggnn(1) man page and the _T_a_p_e
  117.            _S_u_b_s_y_s_t_e_m _U_s_e_r'_s _G_u_i_d_e, publication SG-2051 for more information
  118.            about the eerr9900 FFIO layer.
  119.  
  120.            The fields of this structure have the following meaning:
  121.  
  122.            ffffcc__gglleenn     Number of words to copy to the array pointed to by
  123.                         field ffffcc__ppaa.
  124.  
  125.            ffffcc__ssyynncchh    Synchronization value, as follows:  a value of 11
  126.                         indicates to synchronize the dataset before
  127.                         obtaining position information; a value of 00 means
  128.                         do not synchronize the dataset.  This field is
  129.                         ignored if the last operation was a read.  It is
  130.                         also invalid to specify this value if end-of-volume
  131.                         (EEOOVV) processing is enabled, and the user has
  132.                         reached EEOOVV but has not started special processing.
  133.  
  134.            ffffcc__ppaa       Address of array that will contain information
  135.                         returned by this function.  The values returned in
  136.                         this array are as follows:
  137.  
  138.            ffffcc__ppaa[[00]]    Current volume identifier.
  139.  
  140.            ffffcc__ppaa[[11]] - ffffcc__ppaa[[66]]
  141.                         Characters 1-48 of the path name of the file opened
  142.                         to this tape.
  143.  
  144.            ffffcc__ppaa[[77]]    Integer file section number.
  145.  
  146.            ffffcc__ppaa[[88]]    Integer file sequence number.
  147.  
  148.            ffffcc__ppaa[[99]]    Integer block number relative to tape mark
  149.                         specified in ffffcc__ppaa[[2222]].
  150.  
  151.            ffffcc__ppaa[[1100]]   Integer number of blocks in the library buffer.  If
  152.                         additional processing layers have been specified
  153.                         with aassssiiggnn(1) or aassggccmmdd(1), those layers may also
  154.                         hold buffered data, but they will not be included
  155.                         in this field.
  156.  
  157.            ffffcc__ppaa[[1111]]   Integer number of blocks in the IOP or system
  158.                         buffer.
  159.  
  160.            ffffcc__ppaa[[1122]]   Integer device ID or unit number.
  161.  
  162.            ffffcc__ppaa[[1133]]   Device identifier or name.
  163.  
  164.            ffffcc__ppaa[[1144]]   Generic device name.
  165.  
  166.            ffffcc__ppaa[[1155]]   Last device function.
  167.  
  168.            ffffcc__ppaa[[1166]]   Last device status.
  169.  
  170.            ffffcc__ppaa[[1177]]   Data transfer count in bytes.
  171.  
  172.            ffffcc__ppaa[[1188]]   Buffer memory sector count.
  173.  
  174.            ffffcc__ppaa[[1199]]   Partial block bytes in buffer memory.
  175.  
  176.            ffffcc__ppaa[[2200]]   Outstanding sector count.
  177.  
  178.            ffffcc__ppaa[[2211]]   Outstanding block count.
  179.  
  180.            ffffcc__ppaa[[2222]]   User tape mark number, including tape marks
  181.                         embedded in the data.
  182.  
  183.            ffffcc__ppaa[[2233]]   Direction from tape mark in previous word:  0 =
  184.                         after tape mark; 1 = before tape mark.
  185.  
  186.            ffffcc__ppaa[[2244]]   Today's year modulus 100.
  187.  
  188.            ffffcc__ppaa[[2255]]   Today's Julian day.
  189.  
  190.            ffffcc__ppaa[[2266]]   File identifier, up to the first 8 characters.
  191.  
  192.            ffffcc__ppaa[[2277]]   Record format name.
  193.  
  194.            ffffcc__ppaa[[2288]]   Tape density:  1 = 1600 bpi; 2 = 6250 bpi.
  195.  
  196.            ffffcc__ppaa[[2299]]   Maximum block size.
  197.  
  198.            ffffcc__ppaa[[3300]]   Record length.
  199.  
  200.            ffffcc__ppaa[[3311]]   File status:  1 = new; 2 = old; 3 = append.
  201.  
  202.            ffffcc__ppaa[[3322]]   Label type:  1 = no label; 2 = ANSI label; 3 = IBM
  203.                         standard label; 4 = bypass label.
  204.  
  205.            ffffcc__ppaa[[3333]]   Integer file sequence number of first file on
  206.                         volume.
  207.  
  208.            ffffcc__ppaa[[3344]]   Ring status:  0 = ring out; 1 = ring in.
  209.  
  210.            ffffcc__ppaa[[3355]]   Expiration year modulus 100.
  211.  
  212.            ffffcc__ppaa[[3366]]   Expiration Julian day.
  213.  
  214.            ffffcc__ppaa[[3377]]   First volume identifier of file.
  215.  
  216.            ffffcc__ppaa[[3388]]   User end-of-volume status:  0 = EOV processing off;
  217.                         1 = EOV processing on.
  218.  
  219.            ffffcc__ppaa[[3399]]   User end-of-volume processing status:  0 = not in
  220.                         active EOV processing; 1 = in active EOV
  221.                         processing.
  222.  
  223.            ffffcc__ppaa[[4400]]   User read/write tape mark status:  0 = user
  224.                         read/write tape mark not allowed;
  225.                         1 = user read/write tape mark is allowed.
  226.  
  227.            ffffcc__ppaa[[4411]]   Block attribute:  ''BB'' = blocked records; ''SS'' =
  228.                         spanned records, if the record format is ''VV'', or
  229.                         standard records, if the record format is ''FF''; ''RR''
  230.                         = blocked and spanned records, if the record format
  231.                         is ''VV'', blocked and standard records, if the record
  232.                         format is ''FF''; ''00'' = none of the previous values.
  233.  
  234.            ffffcc__ppaa[[4422]] - ffffcc__ppaa[[4477]]
  235.                         File identifier.
  236.  
  237.      FFCC__GGEETTIINNFFOO
  238.            Gets information about the layers connected to this open file.
  239.            _a_r_g is a pointer to structure ffffcc__iinnffoo__ss.  The information
  240.            returned in this structure is as follows:
  241.  
  242.            ffffcc__ffllaaggss
  243.                  Flag word containing attributes of the file/connection.
  244.                  These bit masks are defined in header file ffffiioo..hh and are
  245.                  set if true, as follows:
  246.  
  247.                  FFFFCC__SSTTRRMM       Can handle stream I/O.
  248.  
  249.                  FFFFCC__RREECC        Can handle records.
  250.  
  251.                  FFFFCC__WWEEOOFF       Can represent EEOOFF.
  252.  
  253.                  FFFFCC__WWEEOODD       Can represent EEOODD (always set).
  254.  
  255.                  FFFFCC__BBKKSSPP       Can handle backspace.
  256.  
  257.                  FFFFCC__BBKKFFIILL      Can handle backfile.
  258.  
  259.                  FFFFCC__SSEEEEKKAA      Can seek absolute.
  260.  
  261.                  FFFFCC__SSEEEEKKRR      Can seek relative.
  262.  
  263.                  FFFFCC__SSEEEEKKEE      Can seek to end.
  264.  
  265.                  FFFFCC__PPOOSSRREECC     Can position by record number.
  266.  
  267.                  FFFFCC__PPOOSSFFIILL     Can position by EEOOFF mark.
  268.  
  269.                  FFFFCC__RRWWNNDD       Can rewind by seek(x,0,0).
  270.  
  271.                  FFFFCC__FFIIXXDD       Can do fixed-length records.
  272.  
  273.                  FFFFCC__VVAARR        Can do variable-length records.
  274.  
  275.                  FFFFCC__BBIINNAARRYY     Can do binary data.
  276.  
  277.                  FFFFCC__CCOODDEEDD      Can do formatted (character) data.
  278.  
  279.                  FFFFCC__RRDDMM        Can do random I/O (no truncation).
  280.  
  281.                  FFFFCC__SSEEQQ        Can do sequential I/O.
  282.  
  283.                  FFFFCC__AASSYYNNCC      Can do asynchronous I/O.  (All layers have
  284.                                 asynchronous entry points, but this bit
  285.                                 tells whether the behavior is actually
  286.                                 async.)
  287.  
  288.                  FFFFCC__WWRRTTRRUUNNCC    Write implies truncation.
  289.  
  290.                  FFFFCC__NNOOTTRRNN      Does no transformation on data; no control
  291.                                 words are added or subtracted.  Data is not
  292.                                 changed.
  293.  
  294.            ffffcc__ggrraann
  295.                  Minimum granularity.  This is the smallest size in bits of
  296.                  a valid data transfer.  For example, the system call layer
  297.                  has an ffffcc__ggrraann of 8, as it can handle a byte as its
  298.                  smallest unit of data transfer.  Some CDC record formats
  299.                  have a granularity of 60.
  300.  
  301.            ffffcc__rreecclleenn
  302.                  Valid only for fixed length records.  This is the record
  303.                  length in bits.
  304.  
  305.            ffffcc__ffdd
  306.                  Lowest level file descriptor for the layer that makes
  307.                  system calls.  This is not always available, or may not be
  308.                  meaningful for some layers or combinations of layers.
  309.                  This is -1 if no descriptor is available.
  310.  
  311.      FFCC__GGEETTLLKK
  312.            Performs an ffccnnttll call with _c_m_d FF__GGEETTLLKK.  _a_r_g is a pointer to
  313.            structure fflloocckk (defined in ssyyss//ffccnnttll..hh), which is used in the
  314.            ffccnnttll call.  Currently supported only by the ssyyssccaallll and ssyysstteemm
  315.            layers, and not for tapes or ER90 devices.
  316.  
  317.      FFCC__GGEETTLLKKWW
  318.            Performs an ffccnnttll call with _c_m_d FF__GGEETTLLKKWW.  _a_r_g is a pointer to
  319.            structure fflloocckk (defined in ssyyss//ffccnnttll..hh), which is used in the
  320.            ffccnnttll call.  Currently supported only by the ssyyssccaallll and ssyysstteemm
  321.            layers, and not for tapes or ER90 devices.
  322.  
  323.      FFCC__IIAALLLLOOCC
  324.            Performs an iiaalllloocc system call.  Supported only on UNICOS and
  325.            UNICOS/mk architectures and only by the ssyyssccaallll and ssyysstteemm
  326.            layers.  Not supported for tapes or ER90 devices.  _a_r_g is a
  327.            pointer to structure ffff__iiaalllloocc__ssttrruucctt, defined in the ffffiioo..hh
  328.            file.  The iiaalllloocc call is made using the following parameters:
  329.  
  330.              * The iiaa__nnbb element of the structure is the second argument
  331.  
  332.              * The iiaa__ffllaagg element of the structure is the third argument
  333.  
  334.              * The iiaa__ppaarrtt element of the structure is the fourth argument
  335.  
  336.              * The iiaa__aavvll element of the structure is the fifth argument
  337.  
  338.      FFCC__RREECCAALLLL
  339.            Awaits completion of an asynchronous FFIO request.  Argument _a_r_g
  340.            is a pointer to a structure of type ssttrruucctt ffffssww, which is the
  341.            status return structure of the asynchronous request.  Function
  342.            ffffffccnnttll waits for completion of the asynchronous request, if
  343.            necessary.  Fields in the status return structure are set as
  344.            described under function ffffrreeaaddaa(3C).
  345.  
  346.      FFCC__SSCCRRAATTCCHH
  347.            Specifies that a file is to be deleted at close time.  The _a_r_g
  348.            argument is a pointer to _i_n_t.  On exit, **_a_r_g is set to contain
  349.            zero or more of the following result bits:
  350.  
  351.            SSCCRR__NNOOFFLLUUSSHH       Set if ffffcclloossee processing has been optimized
  352.                              to suppress buffer flushing.
  353.  
  354.            SSCCRR__SSIINNGGLLEELLIINNKK    Set if the file is not a pipe or a tty, has a
  355.                              link count equal to one, and is not a
  356.                              symbolicly linked file.
  357.  
  358.            SSCCRR__UUNNLLIINNKKEEDD      Set if this ffffffccnnttll call has successfully
  359.                              unlinked the file.
  360.  
  361.      FFCC__SSEETTLLKK
  362.            Performs an ffccnnttll call with _c_m_d FF__SSEETTLLKK.  _a_r_g is a pointer to
  363.            structure fflloocckk (defined in ssyyss//ffccnnttll..hh), which is used in the
  364.            ffccnnttll call.  Currently supported only by the ssyyssccaallll and ssyysstteemm
  365.            layers, and not for tapes or ER90 devices.
  366.  
  367.      FFCC__SSKKIIPPBBAADD
  368.            Skips bad data (valid only for online tape files on UNICOS and
  369.            UNICOS/mk systems and ER90 files on UNICOS systems.  _a_r_g is a
  370.            pointer to structure ffffcc__bbaaddddaattaa__ss, defined in header file
  371.            ffffiioo..hh.  This _c_m_d is valid with the ttaappee FFIO layer.  The fields
  372.            of this structure used by FFCC__SSKKIIPPBBAADD are as follows; all other
  373.            fields are unused:
  374.  
  375.            ffffcc__bblloocckkss     The number of blocks skipped is returned in this
  376.                           field.
  377.  
  378.            ffffcc__tteerrmmccnndd    Position after skipping bad data is returned in
  379.                           this field, as follows:  0 indicates end of
  380.                           block; 1 indicates EEOOFF or EEOODD; and a value less
  381.                           than 0 indicates that an error occurred.  The
  382.                           absolute value is the error number.
  383.  
  384.      FFCC__SSTTAATT
  385.            Returns a structure much like the one returned by the ffssttaatt (see
  386.            ssttaatt(2))  system call.  _a_r_g is a pointer to a ffffcc__ssttaatt__ss
  387.            structure (from ffffiioo..hh).  Fields in this structure are filled in
  388.            as appropriate by the layers.  For the system call layer, all
  389.            fields are simply retrieved by doing an ffssttaatt call.  For other
  390.            layers, such as mmrr, the _s_i_z_e field in the ssttaatt structure is
  391.            modified to reflect the buffered data.  Other layers can make
  392.            similar changes to the basic information from the system for
  393.            similar reasons.  The result is a ssttaatt structure that can be
  394.            used in the same way and for the same purposes as the ffssttaatt
  395.            system call.
  396.  
  397.      FFCC__SSEETTSSPP
  398.            Disables special EOV processing.  This value is valid only for
  399.            online tape files on UNICOS and UNICOS/mk systems and ER90 files
  400.            on UNICOS systems.  _a_r_g is an integer value that should be set
  401.            to 0.  See ffffsseettsspp(3C) for a description of how to enable
  402.            special EOV processing.  This _c_m_d is valid with the ttaappee FFIO
  403.            layers.
  404.  
  405.      FFCC__SSTTAARRTTSSPP
  406.            Starts special EOV processing.  This value is valid only for
  407.            online tape files on UNICOS and UNICOS/mk systems and ER90 files
  408.            on UNICOS systems.  _a_r_g is unused.  EOV processing must be
  409.            enabled prior to starting special EOV processing.  This function
  410.            creates an alternative path to or from a tape.  Tape blocks in
  411.            the pipeline are held aside.  Subsequent write operations will
  412.            go directly to tape; subsequent read operations will come
  413.            directly from tape (if data is available) or from the blocks in
  414.            the pipeline.  Both read and write operations are performed in
  415.            FIFO order.  After you have read from the blocks in the
  416.            pipeline, they are unavailable for writing.  This _c_m_d is valid
  417.            with the following ttaappee FFIO layer.
  418.  
  419.      FFCC__TTPPCC__SSDDBBSSZZ
  420.            Changes the data block size on an ER90 device.  This is valid
  421.            only when using the ttaappee layer.  _a_r_g is the requested new block
  422.            size.  This _c_m_d has no effect when it is used with an IBM-
  423.            compatible tape.
  424.  
  425.            Not supported on IRIX systems.
  426.  
  427.      FFCC__TTSSYYNNCC
  428.            (Valid only for online tape files on UNICOS and UNICOS/mk
  429.            systems and ER90 files on UNICOS systems.  It requests that the
  430.            tape file be synchronized.  This command is ignored if the last
  431.            operation was a read.  It is also invalid to request
  432.            synchronization if the end-of-volume (EOV) processing is
  433.            enabled, and the user has reached EOV but has not started
  434.            special processing.  If the end-of-volume processing is enabled,
  435.            the user should check to see if EOV was reached after requesting
  436.            FFCC__TTSSYYNNCC (see the description for FFCC__CCHHEECCKKTTPP). In this case, the
  437.            ffffffccnnttll returns without error, but the tape may not be
  438.            synchronized (that is, data may remain buffered).  This _c_m_d is
  439.            valid with the following FFIO layers:  ttaappee, eerr9900, bbuuffaa.
  440.  
  441.            The eerr9900 layer is not supported on CRAY T3E systems.
  442.  
  443. RREETTUURRNN VVAALLUUEESS
  444.      The ffffffccnnttll function returns 0 on success.  Otherwise, it returns -1
  445.      and the ssww__eerrrroorr field of the ssttaatt structure contains the error
  446.      number.
  447.  
  448. SSEEEE AALLSSOO
  449.      fffflliissttiioo(3C) ffffooppeenn(3C), ffffrreeaaddaa(3C), ffffsseettsspp(3C), ffffwwrriitteeaa(3C)
  450.  
  451.      aassssiiggnn(1), aassggccmmdd(1)
  452.  
  453.      _T_a_p_e _S_u_b_s_y_s_t_e_m _U_s_e_r'_s _G_u_i_d_e, publication SG-2051, for more information
  454.      about the eerr9900 FFIO layer
  455.  
  456.      _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication
  457.      SR-2165, for the printed version of this man page.
  458.